package cn.ethan.demo.design.factory.impl;

import cn.ethan.demo.design.factory.CacheAdapter;
import cn.ethan.demo.design.matter.IIR;

import java.util.concurrent.TimeUnit;

/**
 * @author 张俊辉
 */

public class IIRCacheAdapter implements CacheAdapter {

    private IIR iir = new IIR();

    public String get(String key) {
        return iir.get(key);
    }

    public void set(String key, String value) {
        iir.set(key, value);
    }

    public void set(String key, String value, long timeout, TimeUnit timeUnit) {
        iir.setExpire(key, value, timeout, timeUnit);
    }

    public void del(String key) {
        iir.del(key);
    }
}
